<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-model和radio结合使用</title>
    <script src="../lib/vue_v2.6.14.js"></script>
  </head>
  <body>
    <div id="app">
      <label for="boy"> <input type="radio" name="sex" id="boy" value="男" v-model="sexVal" />男 </label>
      <label for="girl"> <input type="radio" name="sex" id="girl" value="女" v-model="sexVal" />女 </label>
      <p>你选中的性别是：{{ sexVal }}</p>
    </div>

    <script>
      const vm = new Vue({
        el: '#app',
        data: {
          inputVal: '你好呀',
          sexVal: '男'
        }
      })
    </script>
  </body>
</html>
